package com.hengfoxwolf.jnidemo
import android.os.Bundle
import android.util.Log
import com.hengfoxwolf.jnidemo.databinding.ActivityCplusPlusLearnBinding

class CPlusPlusLearnActivity : BaseActivity<ActivityCplusPlusLearnBinding>(ActivityCplusPlusLearnBinding::inflate) {

    override fun init(savedInstanceState: Bundle?) {

        val value = getValueFromJNI(10, 5)
        Log.d(TAG, "value:${value}")

        forwardlistUseFromJNI()

        listUseFromJNI()

        mapUseFromJNI()

        setUseFromJNI()

        classTemplateUseFromJNI()

        pointerUseFromJNI()
    }

    private external fun getValueFromJNI(a: Int, b: Int): Int

    private external fun forwardlistUseFromJNI()

    private external fun listUseFromJNI()

    private external fun mapUseFromJNI()

    private external fun setUseFromJNI()

    private external fun classTemplateUseFromJNI()

    private external fun pointerUseFromJNI()

    companion object {
        init {
            System.loadLibrary("cpluspluslearnlib")
        }
        const val TAG = "CPlusPlusLearnActivity"
    }
}